using LF.Domain.Entities;
using LF.Shared.Dtos.Out;
using System;
using System.Collections.Generic;

namespace LF.Domain.Services
{
    public interface IMenuManagerService : IDomainService
    {
        /// <summary>
        /// 获取菜单列表
        /// </summary>
        List<Menu> All(int index, int pageSize, string? key);

        /// <summary>
        /// 获取总数
        /// </summary>
        long Count(string? key);

        /// <summary>
        /// 获取菜单树
        /// </summary>
        List<Menu> GetMenuTree();

        /// <summary>
        /// 获取用户菜单树
        /// </summary>
        List<Menu> GetUserMenuTree(Guid userId);

        /// <summary>
        /// 获取所有菜单
        /// </summary>
        List<Menu> GetAll();

        /// <summary>
        /// 获取菜单及其子菜单
        /// </summary>
        List<Menu> GetMenuWithChildren(Guid menuId);

        /// <summary>
        /// 检查菜单编码是否存在
        /// </summary>
        bool CheckMenuCodeExists(string menuCode, Guid? excludeId = null);

        /// <summary>
        /// 生成菜单编码
        /// </summary>
        string GenerateMenuCode(Guid? parentId);

        /// <summary>
        /// 获取用户的权限编码列表
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <returns>权限编码列表</returns>
        List<string> GetPermissionCodes(Guid userId);
    }
} 